import { Result } from 'antd';
import { useRouteError } from 'react-router-dom';

function ErrorBoundary() {
  const error: any = useRouteError();
  return (
    <Result
      style={{ marginTop: 300 }}
      status="404"
      title={error?.statusText || '路由地址错误！'}
      subTitle={error?.message || error?.statusText}
    // extra={}
    />
  );
}

export default ErrorBoundary;
